package com.wjs.spring.service;

public class OrderServiceProxy implements OrderService{
    private OrderService orderService;

    public OrderServiceProxy(OrderService orderService) {
        this.orderService = orderService;
    }
    @Override
    public void insert() {
        long start = System.currentTimeMillis();
        orderService.insert();
        long end = System.currentTimeMillis();
        System.out.println("耗费时长：" +(end-start)+"毫秒");
    }

    @Override
    public void delete() {
        long start = System.currentTimeMillis();
        orderService.delete();
        long end = System.currentTimeMillis();
        System.out.println("耗费时长：" +(end-start)+"毫秒");
    }

    @Override
    public void update() {
        long start = System.currentTimeMillis();
        orderService.update();
        long end = System.currentTimeMillis();
        System.out.println("耗费时长：" +(end-start)+"毫秒");
    }

    @Override
    public void select() {
        long start = System.currentTimeMillis();
        orderService.select();
        long end = System.currentTimeMillis();
        System.out.println("耗费时长：" +(end-start)+"毫秒");
    }
}
